package com.renli.vo;

import lombok.Data;

import java.util.List;

@Data
public class Page<T> {
    private Integer currentPage;
    private Integer pageSize;
    private int start;
    private Long count;
    private Long totalPage;
    private List<T> pageList;


    public void setStart() {
        this.start = pageSize*(currentPage-1);
    }

    public void setTotalPage() {
        this.totalPage = count % pageSize == 0 ? count / pageSize : count / pageSize + 1;
    }
}
